package com.example.demo.controller;

import com.example.demo.pojo.Account;
import com.example.demo.repository.AccountDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/TestVersion_JPA")
public class VersionTestController {

    @Autowired
    AccountDao accountDao;
    @RequestMapping("/Test")
    public String TestOne(){
        Account account = new Account();

        account.setId(10);
        account.setName("eeee");
        account.setMoney(7999.0);
        account.setVersion(2);
        accountDao.save(account);



        return "success";
    }
}
